@extends('Admin.layout.layout')
@section('content')
<link href="{{asset('css/users/message.css')}}" rel="stylesheet">
<style>
    .message .message-right{
        height: auto;
    }
</style>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox">
                    <div class="ibox-content">
                        <h2>用户信息</h2>
                        <div class="clients-list">
                            <ul class="nav nav-tabs">
                                <li class="active"><a data-toggle="tab" href="#tab-1">基础信息</a>
                                </li>
                                <li class=""><a data-toggle="tab" href="#tab-2">公司信息</a>
                                </li>
                                <li class=""><a data-toggle="tab" href="#tab-3">认证信息</a>
                                </li>
                                <li class=""><a data-toggle="tab" href="#tab-4">商铺信息</a>
                                </li>
                                <span style="float:right;">
                                    {{--<button type="button" class="btn btn-s-m btn-default return">返回</button>--}}
                                    <button type="button" class="btn btn-w-m btn-primary checkOrder">查看订单<span>({{array_get($data,'count.normal')}})</span></button>
                                    <button type="button" class="btn btn-w-m btn-warning matchOrder">查看配单<span>({{array_get($data,'count.match')}})</span></button>
                                </span>
                            </ul>
                            <div class="tab-content">
                                <div id="tab-1" class="tab-pane active" style="height: 750px;">
                                    <div class="full-height-scroll">
                                        <div class="table-responsive">
                                                <div class= "message clearfix" style="height: auto; margin-top: 50px; padding: 0 0;">
                                                    <div class= "message-left" style="height:450px;border-right: 1px dashed #ccc">
                                                        <h3 class="register-message" style="margin:0 0;">注册信息</h3>
                                                        <p class= "user">用户名：<span>{{array_get($data, 'name')}}</span></p>
                                                        <p class= "user">手机：<span>{{array_get($data, 'phone')}}</span></p>
                                                        <p class= "user">状态：<!-- <input type="checkbox" class="js-switch checkstatus" @if(array_get($data, 'status') == 0) checked @endif /> -->
                                                        <img class="status_show" @if(array_get($data, 'status') == 0) style="display: none;" @endif src="{{asset('img/start.png')}}"  data-name='update_status' data-id='0' alt="">
                                                           
                                                        <img class="status_hide" @if(array_get($data, 'status') == 1) style="display: none;" @endif src="{{asset('img/close.png')}}"  data-name='update_status' data-id='1'>
                                                           
                                                        </p>
                                                        <p class= "user">是否认证：<span>@if(array_get($data, 'identification_type') == 2) 已认证 @else 未认证 @endif</span></p>
                                                        <p class= "user">是否合伙人：<!-- <input type="checkbox" class="js-switch2" @if(array_get($data, 'is_city_partner') == 1) checked @endif /> -->
                                                            <img class="status_show" @if(array_get($data, 'is_city_partner') == 0) style="display: none;" @endif src="{{asset('img/start.png')}}"  data-name='update_partner' data-id='0' alt="">
                                                           
                                                            <img class="status_hide" @if(array_get($data, 'is_city_partner') == 1) style="display: none;" @endif src="{{asset('img/close.png')}}"  data-name='update_partner' data-id='1'>
                                                            
                                                        </p>
                                                        <p class= "user">是否内侧员：<!-- <input type="checkbox" class="js-switch1" @if(array_get($data, 'is_test_user') == 1) checked @endif /> -->
                                                            <img class="status_show" @if(array_get($data, 'is_test_user') == 0) style="display: none;" @endif src="{{asset('img/start.png')}}"  data-name='update_test_user' data-id='0' alt="">
                                                           
                                                            <img class="status_hide" @if(array_get($data, 'is_test_user') == 1) style="display: none;" @endif src="{{asset('img/close.png')}}"  data-name='update_test_user' data-id='1'>
                                                        </p>
                                                        <p class= "user">注册时间：<span>{{array_get($data, 'created_at')}}</span></p>
                                                    </div>
                                                    <div class= "message-right">
                                                        <h3 class="phone-message" style="margin:0 0;">联系人信息</h3>
                                                        <p class="contacts">联系人：<span>{{array_get($data, 'company_material.contact_person')}}</span></p>
                                                        <p class="contacts">职位：<span>{{array_get($data, 'company_material.contact_position')}}</span></p>
                                                        <p class="contacts">联系电话：<span>{{array_get($data, 'company_material.contact_mobile')}} </span></p>
                                                        <p class="contacts">座机：<span>{{array_get($data, 'company_material.contact_tel')}}</span></p>
                                                        <p class="contacts">传真：<span>{{array_get($data, 'company_material.contact_fax')}}</span></p>
                                                        <p class="contacts">联系地址：<span>{{array_get($data, 'company_material.contact_address_name')}}</span></p>
                                                        <p class="contacts">邮编：<span>{{array_get($data, 'company_material.contact_postcode')}}</span></p>
                                                    </div>
                                                </div>
                                                <div class="address">收货人地址</div>
                                                <div class="product">
                                                    <table class="table table-striped table-hover">
                                                     <thead>
                                                        <tr class="product-message">
                                                            <td class = "product-name" width="50" height="32">序号</td>
                                                            <td class = "product-name" width="190" height="32">地区</td>
                                                            <td class = "product-name" width="155" height="32">详细地址</td>
                                                            <td class = "product-name" width="155" height="32">邮编</td>
                                                            <td class = "product-name" width="223" height="32">收货人</td>
                                                            <td class = "product-name" width="140" height="32">手机号码</td>
                                                            <td class = "product-name" width="140" height="32">类型</td>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                    @if(!empty($data['address']))                                                    
                                                        @foreach($data['address'] as $key => $value)
                                                        <tr class = "product-type">
                                                            <td class = "product-name" width="50" height="32">{{$key+1}}</td>
                                                            <td class = "product-name" width="190" height="32">{{array_get($value, 'regions.merger_name')}}</td>
                                                            <td class = "product-name" width="155" height="32">{{array_get($value, 'address')}}</td>
                                                            <td class = "product-name" width="155" height="32">{{array_get($value, 'postcode')}}</td>
                                                            <td class = "product-name" width="208" height="32">{{array_get($value, 'receiver')}}</td>
                                                            <td class = "product-name" width="140" height="32">{{array_get($value, 'phone')}}</td>
                                                            <td class = "product-name" width="140" height="32">@if(array_get($value, 'is_default') == 0) -- @elseif(array_get($value, 'is_default') == 1) 默认 @endif</td>
                                                        </tr>
                                                        @endforeach                                                    
                                                    @endif
                                                    </tbody>
                                                 </table>
                                            </div>
                                            <div class="address">发票开票信息</div>
                                            <div class="product">
                                                <table class="table table-striped table-hover">
                                                     <thead>
                                                        <tr class="product-message">
                                                            <td class = "product-name" width="50" height="32">序号</td>
                                                            <td class = "product-name" width="190" height="32">类型</td>
                                                            <td class = "product-name" width="155" height="32">发票抬头</td>
                                                            <td class = "product-name" width="155" height="32">发票税号</td>
                                                            <td class = "product-name" width="223" height="32">开票地址</td>
                                                            <td class = "product-name" width="140" height="32">开票电话</td>
                                                            <td class = "product-name" width="140" height="32">开票开户银行</td>
                                                            <td class = "product-name" width="140" height="32">开票银行账户</td>
                                                            <td class = "product-name" width="100" height="32">类型</td>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                    @if(!empty($data['user_invoice']))                                                    
                                                        @foreach($data['user_invoice'] as $key => $value)
                                                        <tr class = "product-type">
                                                            <td class = "product-name" width="50" height="32">{{$key+1}}</td>
                                                            <td class = "product-name" width="190" height="32">@if(array_get($value, 'invoice_message') == 1) 个人 @elseif(array_get($value, 'invoice_message') == 2) 企业 @endif</td>
                                                            <td class = "product-name" width="155" height="32">{{array_get($value, 'invoice_title')}}</td>
                                                            <td class = "product-name" width="155" height="32">{{array_get($value, 'tax_code')}}</td>
                                                            <td class = "product-name" width="208" height="32">{{array_get($value, 'invoice_address')}}</td>
                                                            <td class = "product-name" width="140" height="32">{{array_get($value, 'invoice_tel')}}</td>
                                                            <td class = "product-name" width="140" height="32">{{array_get($value, 'invoice_bank')}}</td>
                                                            <td class = "product-name" width="100" height="32">{{array_get($value, 'invoice_account')}}</td>
                                                            <td class = "product-name" width="100" height="32">@if(array_get($value, 'is_default') == 0) -- @elseif(array_get($value, 'is_default') == 1) 默认 @endif</td>
                                                        </tr>
                                                        @endforeach                                                    
                                                    @endif
                                                    </tbody>
                                                 </table>
                                            </div>
                                            <!-- bottom -->
                                            <div class = "bottom-con">
                                                <button class ="return">返回</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="tab-2" class="tab-pane" style="height: 750px;">
                                    <div class="full-height-scroll">
                                        <div class="table-responsive">
                                            <div class= "message clearfix" style="height: auto; margin-top: 50px; padding: 0 0;">
                                                <div class= "message-left">
                                                    <h3 class="register-message" style="margin:0 0;">公司基本</h3>
                                                    <p class= "user">公司名称：<span>{{array_get($data['company'], 'company_name')}}</span></p>
                                                    <p class= "user">公司类型：<span>{{array_get($data['company_material'], 'ent_type_name')}}</span></p>
                                                    <p class= "user">公司性质：<span>{{array_get($data['company_material'], 'ent_property_name')}}</span></p>
                                                    <p class= "user">员工人数：<span>{{array_get($data['company_material'], 'ent_emp_number')}}</span></p>
                                                </div>
                                                <div class= "message-right">
                                                    <h3 class="phone-message" style="margin:0 0;">经营信息</h3>
                                                    <p class="contacts">经营模式：<span>{{array_get($data['company_material'], 'business_model')}}</span></p>
                                                    <p class="contacts">经营地址：<span>{{array_get($data['company_material'], 'business_address_name')}}</span></p>
                                                    <p class="contacts">主营行业：<span>{{array_get($data['company_material'], 'business_trade_name')}}</span></p>
                                                    <p class="contacts">主营产品：<span>{{array_get($data['company_material'], 'business_product_name')}}</span></p>
                                                    <p class="contacts">客户群体：<span>{{array_get($data['company_material'], 'customer_groups_name')}}</span></p>
                                                    <p class="contacts">销售区域：<span>{{array_get($data['company_material'], 'sales_region_name')}}</span></p>
                                                    <p class="contacts">年营业额：<span>{{array_get($data['company_material'], 'business_sum')}}</span></p>
                                                </div>
                                            </div>
                                            <div class= "message clearfix" style="height: auto;padding: 0 0;border-top: 0;">
                                                <div class= "message-left">
                                                    <h3 class="register-message" style="margin:0 0;">采购信息</h3>
                                                    <p class= "user">采购产品：<span>{{array_get($data['company_material'], 'purchase_products_name')}}</span></p>
                                                    <p class= "user">采购区域：<span>{{array_get($data['company_material'], 'purchase_region_name')}}</span></p>
                                                </div>
                                                <div class= "message-right">
                                                    <h3 class="phone-message" style="margin:0 0;">公司展示</h3>
                                                    <p class="contacts">公司logo：<img width="100" src="{{array_get($data['company_material'], 'ent_logo')}}"></p>
                                                    <p class="contacts">服务标签：<span>{{array_get($data['company_material'], 'ent_service_tag_name')}}</span></p>
                                                    <p class="contacts">公司理念：<span>{{array_get($data['company_material'], 'ent_idea')}}</span></p>
                                                    <p class="profile">公司简介：</p>
                                                    <span class="introduce">{{array_get($data['company_material'], 'ent_intro')}}</span>
                                                </div>
                                            </div>
                                        </div>
                                        <!-- bottom -->
                                        <div class = "bottom-con">
                                                <button class ="return">返回</button>
                                        </div>
                                    </div>
                                </div>
                                <div id="tab-3" class="tab-pane" style="height: 750px;">
                                    <div class="full-height-scroll">
                                        <div class="table-responsive">
                                            <div class= "message clearfix" style="height: auto; margin-top: 50px; padding: 0 0;">
                                                <div class= "message-left left" style="height:auto">
                                                    <h3 class="register-message" style="margin:0 0;">认证信息</h3>
                                                    <div class="company">
                                                        <p class= "user">公司名称：<span>{{array_get($data['company'], 'company_name')}}</span></p>
                                                        <p class= "user">公司法人：<span>{{array_get($data['company'], 'angent')}}</span></p>
                                                        <p class= "user">公司地址：<span>{{array_get($data['company'], 'company_address')}}</span></p>
                                                        <p class= "user">注册地址：<span>{{array_get($data['company'], 'reg_location')}}</span></p>
                                                        <p class= "user">公司电话：<span>{{array_get($data['company'], 'company_tel')}}</span></p>
                                                    </div>
                                                    <p class="big">点击放大查看相应的证件信息</p>
                                                    <p class="Certificates">相关证件：</p>

                                                        <div class="lightBoxGallery"style="position: relative;top: -35px;left: 120px;width: 70%;">
                                                        @if(array_get($data['company'], 'licence_type') == 'single')
                                                            <a href="{{array_get($data['company'], 'agnet_licence')}}" title="三证合一" data-gallery=""><img width="100" src="{{array_get($data['company'], 'agnet_licence')}}"></a>
                                                        @elseif(array_get($data['company'], 'licence_type') == 'multi')
                                                            <a href="{{array_get($data['company'], 'agnet_licence')}}" title="营业执照" data-gallery=""><img width="100" src="{{array_get($data['company'], 'agnet_licence')}}"></a>
                                                            <a href="{{array_get($data['company'], 'tax_certificate')}}" title="税务登记证" data-gallery=""><img width="100" src="{{array_get($data['company'], 'tax_certificate')}}"></a>
                                                            <a href="{{array_get($data['company'], 'organization_code_certificate')}}" title="组织机构代码证" data-gallery=""><img width="100" src="{{array_get($data['company'], 'organization_code_certificate')}}"></a>
                                                        @endif
                                                            
                                                            <div id="blueimp-gallery" class="blueimp-gallery">
                                                                <div class="slides"></div>
                                                                <h3 class="title"></h3>
                                                                <a class="prev">‹</a>
                                                                <a class="next">›</a>
                                                                <a class="close">×</a>
                                                                <a class="play-pause"></a>
                                                                <ol class="indicator"></ol>
                                                            </div>
                                                        </div>

                                                </div>
                                                <div class= "message-right">
                                                    <h3 class="phone-message" style="margin:0 0;">打款认证</h3>
                                                    <div class="bank">
                                                        <p class="contacts">申请状态：<span>{{array_get($data['company'], 'step_name')}}</span></p>
                                                        <p class="contacts">申请时间：<span>{{array_get($data['company'], 'apply_at')}}</span></p>
                                                        <p class="contacts">开户银行：<span>{{array_get($data['company'], 'bank')}}</span></p>
                                                        <p class="contacts">银行帐号：<span>{{array_get($data['company'], 'bank_account')}}</span></p>
                                                        <p class="contacts">打款金额：<span>{{array_get($data['company'], 'pay_money_num')}}</span></p>                                                       
                                                    </div>
                                                    <p class="confirm">财务人员请根据此随机生成金额打款，以便用户确认自行完成认证。</p>
                                                    @if(array_get($data['company'], 'id') and array_get($data['company'], 'step')==1)
                                                    <tbody>
                                                        <tr class="gradeX">
                                                            <td class="center">
                                                                <a class="btn-xs btn-primary" data-toggle="modal" data-target="#myModal"style="width:100px;height:30px;background: #008100;display: block;float: left;line-height: 30px;text-align: center;margin: 0 20px;z-index:1;">信息审核不通过</a>
                                                                <!-- <a class="btn-xs btn-danger cancel_order1" data-id="152000000" style="width:100px;height:30px;background: #008100;display: block;float: left;line-height: 30px;text-align: center;margin: 0 20px;">信息审核不通过</a> -->
                                                                <a class="btn-xs btn-danger cancel_order" data-id="152000002" style="width:100px;height:30px;background: #fa6805;display: block;float: left;line-height: 30px;text-align: center;">银行账号已打款</a>

                                                            </td>
                                                        </tr>
                                                    </tbody>
                                                    @endif
                                                    <div class = "bottom-con" style="float: left;margin: 0 20px;">
                                                        <button class ="return">返回</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                               <div id="tab-4" class="tab-pane" style="height: 750px;">
                                    <div class="full-height-scroll">
                                        <div class="table-responsive">
                                            <div class= "message clearfix" style="height: auto; margin-top: 50px; padding: 0 0;">
                                                <div class= "message-left">
                                                    <h3 class="register-message" style="margin:0 0;">商铺基本</h3>
                                                    <p class= "user">公司名称：<span>深圳市瑞达科技有限公司</span></p>
                                                    <p class= "user">创立时间：<span>2017/08/02</span></p>
                                                    <p class= "user">状态：
                                                        <img class="status_show" src="{{asset('img/start.png')}}" alt="" style="display: {{isset($data['shop_id']) && !empty($data['shop']) && $data['shop']['sp_status']==1?'block':'none'}};" data-name='status1' data-id='0'>
                                                        <img class="status_hide" src="{{asset('img/close.png')}}" alt="" style="display: {{isset($data['shop_id']) && !empty($data['shop']) && $data['shop']['sp_status']==1?'none':'block'}};"   data-name='status1' data-id='1'>
                                                    </p>
                                                    <p class= "user">商铺网址：<span><a href="http://zhangshanwang.ejing365.com">http://zhangshanwang.ejing365.com</a></span></p>
                                                    <p class= "user">商铺banner：
                                                        <img width="100" src="{{asset('img/p1.jpg')}}">
                                                        <img width="100" src="{{asset('img/p1.jpg')}}">
                                                        <img width="100" src="{{asset('img/p1.jpg')}}">
                                                    </p>
                                                </div>
                                                <div class= "message-right">
                                                    <h3 class="phone-message" style="margin:0 0;">商铺标识</h3>
                                                    <div class="ordinary">
                                                        <p class="contacts-left">普通经销</p>
                                                        <p class="start"><i class="fa fa-check"></i>注册开通店铺</p>
                                                        <p class="end" style="display: none;"><i class="fa fa-close"></i>注册开通店铺</p>
                                                        <img class="status_show" src="{{asset('img/start.png')}}" alt=""  data-name='shop' data-id='0' style="float: right;margin-top: 20px;display: {{isset($data['shop_id']) && !empty($data['shop']) && in_array('1',$data['shop']['sp_type_id'])?'block':'none'}};">
                                                        <img class="status_hide" src="{{asset('img/close.png')}}" alt="" style="display: {{isset($data['shop_id']) &&  !empty($data['shop']) && in_array('1',$data['shop']['sp_type_id'])?'none':'block'}};float: right;margin-top: 20px;"   data-name='shop' data-id='1'>
                                                    </div>
                                                    <div class="ordinary">
                                                        <p class="contacts-left">合伙人店</p>
                                                        <p class="start1"><i class="fa fa-check"></i>合伙人身份</p>
                                                        <p class="end1" style="display: none;"><i class="fa fa-close"></i>合伙人身份</p>
                                                        <img class="status_show" src="{{asset('img/start.png')}}" alt=""  data-name='partner' data-id='0' style="float: right;margin-top: 20px;display: {{isset($data['shop_id']) && !empty($data['shop']) &&  in_array('2',$data['shop']['sp_type_id'])?'block':'none'}};">
                                                        <img class="status_hide" src="{{asset('img/close.png')}}" alt="" style="display: {{isset($data['shop_id']) && !empty($data['shop']) &&  in_array('2',$data['shop']['sp_type_id'])?'none':'block'}};float: right;margin-top: 20px;"   data-name='partner' data-id='1'>
                                                    </div>
                                                    <div class="ordinary">
                                                        <p class="contacts-left">网上博览</p>
                                                        <p class="start2"><i class="fa fa-check"></i>网上报名博览会</p>
                                                        <p class="end12" style="display: none;"><i class="fa fa-close"></i>网上报名博览会</p>
                                                        <!-- <p class="contacts-right">
                                                            <input type="checkbox" class="js-switch6" checked/>
                                                        </p> -->
                                                        <img class="status_show" src="{{asset('img/start.png')}}" alt=""  data-name='exposition' data-id='0' style="float: right;margin-top: 20px;display: {{isset($data['shop_id']) && !empty($data['shop']) &&  in_array('3',$data['shop']['sp_type_id'])?'block':'none'}};">
                                                        <img class="status_hide" src="{{asset('img/close.png')}}" alt="" style="display: {{isset($data['shop_id']) && !empty($data['shop']) &&  in_array('3',$data['shop']['sp_type_id'])?'none':'block'}};float: right;margin-top: 20px;"   data-name='exposition' data-id='1'>
                                                    </div>
                                                    <div class="ordinary">
                                                        <p class="contacts-left">工厂旗舰</p>
                                                        <p class="start3"><i class="fa fa-check"></i>申请自有品牌</p>
                                                        <p class="end3" style="display: none;"><i class="fa fa-close"></i>申请自有品牌</p>
                                                       <!--  <p class="contacts-right">
                                                            <input type="checkbox" class="js-switch7" checked/>
                                                        </p> -->
                                                        <img class="status_show" src="{{asset('img/start.png')}}" alt=""  data-name='own_brand' data-id='0' style="float: right;margin-top: 20px;display: {{isset($data['shop_id']) && !empty($data['shop']) &&  in_array('4',$data['shop']['sp_type_id'])?'block':'none'}};">
                                                        <img class="status_hide" src="{{asset('img/close.png')}}" alt="" style="display: {{isset($data['shop_id']) && !empty($data['shop']) &&  in_array('3',$data['shop']['sp_type_id'])?'none':'block'}};float: right;margin-top: 20px;"   data-name='own_brand' data-id='1'>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class= "message clearfix" style="height: auto;padding: 0 0;border-top: 0;">
                                                <div class= "message-left">
                                                    <h3 class="register-message" style="margin:0 0;">商铺配置</h3>
                                                    <div class="center">
                                                        <p class= "center-left">下单订单付款超时限制</p>
                                                        <span class= "center-right">2小时</span>
                                                    </div>
                                                    <div class="center">
                                                        <p class= "center-left">收货订单确认超时限制</p>
                                                        <span class= "center-right">7天</span>
                                                    </div>
                                                    <div class="center">
                                                        <p class= "center-left">无理由退货时间限制</p>
                                                        <span class= "center-right">7天</span>
                                                    </div>
                                                    <div class="center">
                                                        <p class= "center-left">库存对用户下单的限制</p>
                                                        <span class= "center-right">无限制</span>
                                                    </div>
                                                </div>
                                                <div class= "message-right">
                                                    <h3 class="phone-message" style="margin:0 0;">自定义分类</h3>
                                                    <p class="camera">网络摄像机</p>
                                                    <p class="hard">硬盘</p>
                                                </div>
                                            </div>
                                            <div class= "message clearfix" style="height: auto;padding: 0 0;border-top: 0;">
                                                <div class= "message-left">
                                                    <h3 class="register-message" style="margin:0 0;">商铺优化配置</h3>
                                                    <div class="store">
                                                       <p class= "title">店铺标题(Title)</p>
                                                        <span class="explain">e井在线,专业安防全产业链服务平台_监控设备_监控摄像机_门禁一卡通_防盗报警_摄像头安装</span>
                                                    </div>
                                                    <div class="store">
                                                        <p class= "title">店铺关键字(Keywords)</p>
                                                        <span class="explain">监控设备,监控摄像机,门禁一卡通,防盗报警,摄像头安装,e井在线</span>
                                                    </div>
                                                    <div class="store">
                                                        <p class= "title">店铺描述(Description)</p>
                                                        <span class="explain">e井在线是一家以网络营销为基础，集在线电子交易、产业链协同服务（包括金融服务）等安防产业增值服务为核心的行业平台，致力于成为国内智能安防,监控设备,安防产品行业领导者！</span>
                                                    </div>
                                                </div>
                                                <div class= "message-right">
                                                    <h3 class="phone-message" style="margin:0 0;">交易数据</h3>
                                                    <p class="contacts">供应商品：<span>30个</span></p>
                                                    <p class="contacts">成交客户：<span>0个</span></p>
                                                    <p class="contacts">成交订单：<span>0个</span></p>
                                                    <p class="contacts">总成交金额：<span>125412.00元</span></p>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>    
            <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal"
                                    aria-hidden="true">×
                            </button>
                            <h4 class="modal-title" id="myModalLabel">
                                认证审核
                            </h4>
                        </div>
                        <form class="form-horizontal m-t" id="form">
                            <input type="hidden" name="update_type" value="update_fail_reason">
                            {{csrf_field()}}                            
                        <div class="modal-body">
                            <h5>请填写认证信息审核不通过原因：</h5>
                            <div class="form-group">
                                <div class="col-sm-8">
                                    <textarea id="fail_reason" name="fail_reason" type="text" style="width: 350px;height: 100px;margin-left: 100px;margin-top: 20px;"/></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="modal-footer">                            
                           <button type="submit" class="btn btn-primary" id="btn_submit">
                                确定
                            </button>
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal" >取消
                            </button>
                        </div>
                        </form>
                    </div>
                </div>
            </div>

    <script src="{{asset('js/plugins/slimscroll/jquery.slimscroll.min.js')}}"></script>
    <script src="{{asset('js/plugins/blueimp/jquery.blueimp-gallery.min.js')}}"></script>
    <script src="{{asset('js/plugins/layer/laydate/laydate.js')}}"></script>
    <script src="{{asset('js/plugins/layer/layer.min.js')}}"></script>
    <!-- 自定义js -->
    <script src="{{asset('js/plugins/switchery/switchery.js')}}"></script>
    <script>
        var user_id = '{{array_get($data, "id")}}';
        var company_id = '{{array_get($data["company"], "id")}}';
        $(function () {
            $('.full-height-scroll').slimScroll({
                height: '100%'
            });
            $(".status_show").click(function(){
                var _this = this;
                var url = '';
                var id =  $(this).attr('data-id');
                var name = $(this).attr('data-name');
                if(name == 'update_status' || name == 'update_partner' || name == 'update_test_user'){
                    url = '{{asset("foradmin/user")}}/'+user_id+'/edit';
                    btn(name,url,id,_this);
                }
            });
            $(".status_hide").click(function(){
                var _this = this;
                var url = '';
                var id =  $(this).attr('data-id');
                var name = $(this).attr('data-name');
                if(name == 'update_status' || name == 'update_partner' || name == 'update_test_user'){
                    url = '{{asset("foradmin/user")}}/'+user_id+'/edit';
                    btn(name,url,id,_this);
                }
            });
            function btn(name,url,id,_this){                
                $.ajax({
                    url:  url,
                    type: 'get',
                    dataType: 'json',
                    data: {update_type : name},
                    success: function (data) {
                        if (0 == data.code){
                            layer.msg('成功');                            
                            if(id ==0){
                               $(_this).hide()
                               $(_this).next('.status_hide').show() 
                           }else{ 
                               $(_this).hide()
                               $(_this).prev('.status_show').show() 
                            }
                        }else{
                            layer.msg('失败');                            
                        } 
                    }
                });
            } 
            //信息审核不通过                
          $('#form').submit(function(){
                if($("#fail_reason").val() == '') {
                  layer.alert('原因不能为空');
                  return false;
                 }              
                var url = '{{asset("foradmin/company")}}/'+company_id+'/edit';
                  $.ajax({
                        url: url,
                        type: 'post',
                        dataType: 'json',
                        data: $('#form').serialize(),
                        success: function (data) {
                            if (0 == data.code) {
                                layer.alert(data.message, {
                                    icon: 1
                                }, function () {
                                    location.reload();
                                });
                            } else {
                                layer.alert(data.message, {
                                    icon: 2
                                });
                            }
                        }
                    });
                 return false;
            })

            //银行账号已打款
            $('.cancel_order').click(function(){
                var url = '{{asset("foradmin/company")}}/'+company_id+'/edit';
                layer.confirm('您确定银行账号已打款吗？', {
                    btn: ['确认', '取消'] //可以无限个按钮
                }, function (index) {
                    $.ajax({
                        url: url,
                        type: 'GET',
                        dataType: 'json',
                        data: {update_type : 'update_step'},
                        success: function (data) {
                            if (0 == data.code) {
                                layer.alert(data.message, {
                                    icon: 1
                                }, function () {
                                    location.reload();
                                });
                            } else {
                                layer.alert(data.message, {
                                    icon: 2
                                });
                            }
                        }
                    });
                }, function (index, layero) {
                    layer.close(index);
                });
            })
            $(".nav-tabs li").click(function(){  
                var picTabNum = $(this).index();  
                // console.log("当前图片标题下标是："+picTabNum);  
                sessionStorage.setItem("picTabNum",picTabNum);  
            });  
            $(function(){  
                var getPicTabNum = sessionStorage.getItem("picTabNum");  
                $(".nav-tabs li").eq(getPicTabNum).addClass("active").siblings().removeClass("active");  
                $(".tab-content>div").eq(getPicTabNum).addClass("active").siblings().removeClass("active");  
            })  
        });
        // 返回上一页
        $(document).on('click','.return',function () {
            history.go(-1);
        });
        // 查看用户订单
        $(document).on('click','.checkOrder',function () {
            location.href = '/foradmin/order?user_name={{array_get($data, 'name')}}&order_type=1';
        });
        // 查看用户配单
        $(document).on('click','.matchOrder',function () {
            location.href = '/foradmin/order?user_name={{array_get($data, 'name')}}&order_type=4';
        });
    </script>
@endsection
